export default ({
  service,
  request,
  serviceForMock,
  requestForMock,
  mock,
  faker,
  tools
}) => ({
  // 项目列表
  projectList(data = {}) {
    return request({
      url: "/project/listAll",
      method: "post",
      data
    });
  },

  // 新增
  projectAdd(data = {}) {
    return request({
      url: "/project/add",
      method: "post",
      data
    });
  },

  // 编辑初始化
  projectUpdateInit(data = {}) {
    return request({
      url: `/project/get/${data}`,
      method: "post",
      data: {}
    });
  },

  // 编辑
  projectUpdate(data = {}) {
    return request({
      url: `/project/update`,
      method: "post",
      data
    });
  },

  // 复制
  projectCopy(data = {}) {
    return request({
      url: `/project/copy/${data}`,
      method: "post",
      data: {}
    });
  },

  // 删除
  projectDelete(data = {}) {
    return request({
      url: "/project/del",
      method: "post",
      data
    });
  },

  // 测试连接
  connectionTest(data = {}) {
    return request({
      url: "/database/testConnection",
      method: "post",
      data
    });
  },

  // 数据库类型及数据库驱动
  projectDatabaseType(data = {}) {
    return request({
      url: "/database/listValidDbType",
      method: "post",
      data
    });
  }
});
